package edu.iastate.SIB;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TabHost; 

public class SIBMain extends Activity {
	private TabHost myTabHost; 
	private Button btnYes;
	private Button btnNo;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        //Set Button
        this.btnYes = (Button)this.findViewById(R.id.btnMainYes);
        btnYes.setOnClickListener(btnYesOnClick);
       
        this.btnNo = (Button)this.findViewById(R.id.btnMainNo);
        btnNo.setOnClickListener(btnNoOnClick);
        
        //Set Tab
        this.myTabHost = (TabHost)this.findViewById(R.id.th_set_menu_tabhost);
        this.myTabHost.setup();
        myTabHost.addTab(myTabHost.newTabSpec("tab_test1").setIndicator("SHOUDL I BUY?").setContent(R.id.grid_set_menu_page1));
        myTabHost.addTab(myTabHost.newTabSpec("tab_test2").setIndicator("ABOUT").setContent(R.id.aboutContent));
    }
    
    private OnClickListener btnYesOnClick = new OnClickListener() {
        public void onClick(View v) {  	        	
        	Intent mIntent = new Intent(SIBMain.this,Question01.class);
    		startActivity(mIntent);
        	
        } 
    };
    
    private OnClickListener btnNoOnClick = new OnClickListener() {
        public void onClick(View v) {  	        
        	
        	Intent mIntent = new Intent(SIBMain.this,Question02.class);
    		startActivity(mIntent);
        	
        } 
    };
}